
(function($,obj ) {
	
	$.fn.JDragResize = function( options ) {
	
	defaultOptions = {
			minWidth : 50,
			minHeight : 50,
			minLeft : 20,
			minTop : 20,
			maxLeft : 600,
			maxTop : 600,
			handles : [ 'tl', 'tm', 'tr', 'ml', 'mr', 'bl', 'bm', 'br', 'mm' ],
			drag:function(){alert(2);}
		};
	
	var name = "JDragResize";
	
	returnValue = this;
	options= jQuery.extend(true,{}, defaultOptions, options);
	
	this.each(function() {
		var orderNo = $.data( this, name );
		if ( orderNo ) { 
			orderNo++;
		} else {
			orderNo = 0;
		}
		
		instance = new DragResize(name+"_"+orderNo,  options);
		
		$.data( this, name, ++orderNo );
		
		instance.isElement = function(elm)
		{
		 if (elm.className && elm.className.indexOf('drsElement') > -1) 
			 
			 return true;
		};
		instance.isHandle = function(elm)
		{
		 if (elm.className && elm.className.indexOf('drsMoveHandle') > -1) 
			 return true;
		};
		instance.ondragfocus = function() { };
		instance.ondragstart = function(isResize) { };
		instance.ondragmove = function(isResize) { };
		instance.ondragend = function(isResize) { };
		instance.ondragblur = function() { };
		
		instance.apply(this);
	});
	return returnValue;
	
	};
	 
	
})(jQuery);
  